package job_center

import (
	"context"
	pb "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/proto/micro_gfyx_oppty_service_proto/micro-gfyx-oppty-service/job_center"
)

type JobCenterServiceIface interface {
	CreateJobAndRun(ctx context.Context, orderId int64, orderType, orderNum, jobType int32, params string) (int64, error)
	GetJobRecordTotal(ctx context.Context, orderType int32, params string) (int64, error)
	StartJob(ctx context.Context, jobId int64) error
	GetJobInfoByOrderId(ctx context.Context, orderId int64) (jobId, jobStatus int32, fileUrl string, err error)
	GetUnfinishedJobIds(ctx context.Context) ([]int64, error)

	MyJobList(ctx context.Context, request *pb.GetMyJobListRequest) (*pb.GetMyJobListResponse, error)
	RerunJob(ctx context.Context, request *pb.RerunJobRequest) (*pb.RerunJobResponse, error)
	NewJob(ctx context.Context, method, sourceType, totalCount int32, params string) (int64, error)
}
